Skip to content

CoLoRe-2LPT: 2LPT velocities added for particles, tracers and beams#74

Open
damonge wants to merge 1 commit intomasterfrom
colore-2lpt
Open

CoLoRe-2LPT: 2LPT velocities added for particles, tracers and beams#74
damonge wants to merge 1 commit intomasterfrom
colore-2lpt

Conversation

@damonge
Copy link
Copy Markdown
Owner

@damonge damonge commented Mar 26, 2026

Copy link
Copy Markdown
Owner Author

@damonge damonge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some preliminary comments. Ignore for now.

int smooth_potential; //Do we smooth the newtonian potential as well?
int dens_type; //Method to produce the density field
int lpt_interp_type;
int lpt_vzty; // Use 2LPT velocities (only makes sense if dens_type is 2LPT)
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slightly pedantic: could we call this lpt_vels instead of lpt_vzty? Just because the z is a bit jarring :-)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say undo these changes to leave the makefile as it was before for simplicity (unless any of these changes affect your modifications, but I think that's not the case)

Comment on lines +1174 to +1176
par->grid_velx[index]=0; // Keep the grids to zero, we will fill them with interpolation scheme (only CIC now; see above)
par->grid_vely[index]=0;
par->grid_velz[index]=0;
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

encase this in an if statement

}
// Normalize velocity by density
for(ii=0;ii<par->nz_here*par->n_grid*ngx;ii++) {
//if(dens[ii]!=0){
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants